#if !defined(RESOURCE_H)
#define RESOURCE_H

#include <string>
#include "resourcetype.h"
#include "resourcemanager.h"

struct IDirect3DDevice9;

namespace gunsmith
{
/*!	\class CResource
	\brief Base class for resources. */
class CResource
{
public:
							CResource		(ERESOURCETYPE eType);
	virtual					~CResource		();
	virtual bool			Create			(void *pSource)			= NULL;
	virtual void			Destroy			()						= NULL;
	virtual	ERESOURCETYPE	GetResourceType	()						const;

protected:
	CResourceManager *m_pResMngr;
	IDirect3DDevice9 *m_pDevice;

private:
	ERESOURCETYPE	m_eResourceType;
	void			*m_pData;
	std::string		m_sSource;
};
}

#endif //RESOURCE_H
